package www.xpu.edu.app;


import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;

import www.xpu.edu.app.student.Activity_stu_1;
import www.xpu.edu.app.student.Activity_stu_3;

import static android.content.Context.MODE_PRIVATE;


/**
 * A simple {@link Fragment} subclass.
 */
public class Fragment4 extends Fragment {


    private View mView;

   /* @Override
    public void onDestroy() {
        super.onDestroy();
        ((ViewGroup)mView.getParent()).removeAllViews();
    }*/
   @Override
   public void onDestroy() {
       super.onDestroy();
   }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        // return inflater.inflate(R.layout.fragment_fragment1, container, false);
        if(mView==null)
        {
            mView=inflater.inflate(R.layout.fragment_fragment4,container,false);
        }
        //寻找工作
        Button button1= mView.findViewById(R.id.fg4_button1);
        button1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(getActivity(),Activity_stu_1.class));
            }
        });
        //求职管理



        Button button2= mView.findViewById(R.id.fg4_button2);
        button2.setOnClickListener(
                new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        //Toast.makeText(getActivity(),"正在开发过程中",Toast.LENGTH_LONG).show();
                        startActivity(new Intent(getActivity(),Activity_stu_3.class));
                    }
                }
        );
        return mView;
    }

}
